#include "OperatorInterface.h"

OperatorInterface::OperatorInterface()
{
	leftStick = new Joystick(1);
	rightStick = new Joystick(2);
	ds = DriverStation::GetInstance();
	lcd = DriverStationLCD::GetInstance();
	estop = new Joystick(3);
}
void OperatorInterface::updateButtons()
{
#if oiExperimental == 1
	
	killSw = ds->GetDigitalIn(3); //true is enable, false is disabled
	liftUp = ds->GetDigitalIn(2); //false for up
	liftDown = ds->GetDigitalIn(4); //false for down
	
	mbUp = ds->GetDigitalIn(5);
	mbDown = ds->GetDigitalIn(7);
	
	topRight = estop->GetRawButton(1);
	middleRight = estop->GetRawButton(2);
	bottomRight = estop->GetRawButton(3);
	topLeft = estop->GetRawButton(4);
	middleLeft = estop->GetRawButton(5);
	bottomLeft = estop->GetRawButton(6);
	feeding = estop->GetRawButton(7);
	ground = estop->GetRawButton(8);
	gripper = estop->GetRawButton(9);
	lineTrack = estop->GetRawButton(10); //true is up
	forkDirection = estop->GetRawButton(11); //0 for left, 1 for right
	
#endif
}
OperatorInterface::~OperatorInterface()
{
	delete leftStick;
	delete rightStick;
	delete estop;
	delete ds;
	
	leftStick = NULL;
	rightStick = NULL;
	estop = NULL;
	ds = NULL;

}
